﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace Fjaspx.UI.Web.Administrator.UCenter
{
    public partial class UGroupConfig : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button_add_xml_Click(object sender, EventArgs e)
        {
            if (FileUpload_Xml.HasFile)
            {
                if (!Directory.Exists(Server.MapPath("~/App_Data/UGroupFrom/")))//判断是否存在
                {
                    Directory.CreateDirectory(Server.MapPath("~/App_Data/UGroupFrom/"));//创建新路径 
                }
                FileUpload_Xml.SaveAs(Server.MapPath("~/App_Data/UGroupFrom/" + Request["UGroup_id"] + ".html"));
                Response.Redirect("Group_admin.aspx");
            }
            else
            {
                Fjaspx.Common.MessageBox.Show(this, "请选择文件！");
                Response.Redirect("Group_admin.aspx");
            }
        }
    }
}
